home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung / Power-Programmierung (Tewi)(1994).iso / magazine / dbms_mag / 9103 / lastlog / read.me < prev    next >
Text File  |  1991-02-17  |  6KB  |  124 lines

  1. This file describes the three programs included in this package that
  2. were not discussed in the March 1991 DBMS Bindery article.  The three
  3. programs are:
  4.  
  5.     AddID
  6.     VerID
  7.     FindIDs
  8.  
  9. Together, the three programs allow you to store application-specific
  10. userids in the bindery, and read them back to verify a user's entry to
  11. the application.  You must be a Supervisor (or equivalent) to run the
  12. AddID and FindIDs programs successfully, but any user can run VerID
  13. (normally from a batch file) as part of an application start-up routine.
  14. ___________________________________________________________________________
  15. AddID - Allows the Supervisor to assign application-specific userids for
  16.         any network user.  The syntax is as follows:
  17.  
  18.         AddID <user-network-id> <appl-id> <user-id>
  19.  
  20.         where <user-network-id> is the user's network (login) id
  21.               <appl-id> is a name assigned to the application (max 12 chars)
  22.               <user-id> is the user's id for the application
  23.  
  24.         The Supervisor should assign application names consistently,
  25.         e.g., Sales, Acct, Inventory.  The user-id is the id the user
  26.         must provide in order to gain access to the application (it acts
  27.         as a password, really).  For example:
  28.  
  29.             AddID Molly Sales Secret
  30.  
  31.         will assign a bindery property "SALES" to user Molly, with a
  32.         property value of "SECRET".  Using the VerID program (described
  33.         next), Molly can be denied access to the Sales application
  34.         unless she provides the userid "SECRET" when calling the Sales
  35.         application.
  36.  
  37.         For conformity in assigning properties in the bindery, the
  38.         program automatically appends "ID" to the application name (in
  39.         this case, it stores the Sales application-id as SALESID in the
  40.         bindery).  This should be transparent to both the Supervisor
  41.         assigning ids and the end-users.  Only a programmer wishing to
  42.         modify the code needs to be aware of this.
  43.  
  44.         AddID can be used to change a user's userid for a given
  45.         application by simply calling it again.  For example, to change
  46.         Molly's id (password) from "Secret" to "Sneakers" for the Sales
  47.         application, you'd type:
  48.  
  49.             AddID Molly Sales Sneakers
  50.  
  51.         Appropriate error messages are returned if the program is unable
  52.         to assign a property (application name) and/or property value
  53.         (userid).
  54.  
  55.         As an exercise, you may want to enhance the program to include a
  56.         friendlier "front-end", allowing the Supervisor to enter values
  57.         interactively, rather than as command-line parameters.
  58.  
  59. ___________________________________________________________________________
  60.  
  61. VerID - This program works in connection with AddID by verifying that
  62.         the application-id/userid combination passed to the program
  63.         (normally by the end user) matches what's stored in the bindery.
  64.         Its syntax is:
  65.  
  66.         VerID <appl-id> <user-id>
  67.           where <appl-id> is the name given to the application (note
  68.                           that this must match the name used in the
  69.                           AddID program)
  70.                 <user-id> is the application-specific userid
  71.                           (again, this must match the id assigned to
  72.                           the user through the AddID program).
  73.  
  74.         VerID validates the application-id/userid for the user who runs
  75.         it (i.e., the login name of the person calling the program).
  76.         It returns the following values:
  77.  
  78.              0 - Match (successful)
  79.              1 - No match
  80.              2 - Can't read property value
  81.              3 - Too few parameters supplied
  82.  
  83.         VerID is designed to be used from an application start-up batch
  84.         file.  For example, a Sales application might have a start-up
  85.         file that looks something like this:
  86.  
  87.             ECHO OFF
  88.             VERID Sales %1
  89.             IF ERRORLEVEL 1 GOTO NoWay
  90.             ECHO Loading the Sales application...
  91.             FoxProLn Sales
  92.             GOTO End
  93.             :NoWay
  94.             ECHO Sorry, You're denied access to the Sales program
  95.             :End
  96.  
  97. ___________________________________________________________________________
  98.  
  99. FindIDs - This program simply lists all users who have an
  100.           application-specific property stored in the bindery.  It can
  101.           be run successfully only by a Supervisor (or equivalent).
  102.           It's useful if you forget to whom you have assigned
  103.           application ids, or the application names you've used.  It
  104.           DOES NOT list the userids, since this would be like listing all
  105.           user passwords.  If you really want to see the passwords, you
  106.           can modify the program to call ReadPropertyValue and display
  107.           the password.  A more secure solution, though, is to simply
  108.           change the userid by running AddID again and assigning a new
  109.           userid for the given application-id (this is similar to what
  110.           NetWare 2.1x does for user passwords).
  111.  
  112.           Note that the program does not show the "ID" that AddID
  113.           appends to the end of all application names.
  114.  
  115. ___________________________________________________________________________
  116.  
  117. One final note:  If you use these routines to incorporate security into
  118. your application, you will probably want to write another program that
  119. deletes specific properties for a given user.  This will help you keep
  120. the bindery "clean", eliminating unused properties as necessary.  You
  121. can write such a program using the DeleteProperty function call.
  122.  
  123.  
  124.